<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Math</title>
    <script>
        console.log(Math.max(1,2,3,4,5));
        console.log(Math.min(1,2,3,4,5));
        console.log(Math.random());  //0-1之间的随机数
        console.log(parseInt(Math.random()*100));
        console.log(Math.abs(-16));
        console.log("上入取整："+Math.ceil(0.3));
        console.log("下舍取整：" + Math.floor(5.3));
        console.log(Math.round(0.4));

        function Person(id,name,age) {
            this.id = id;
            this.name = name;
            this.age = age;
        }
        var user = new Person(17,"钱多多",18);
        console.log(user.toSource());  //toSource只支持火狐浏览器
    </script>
</head>
<body>

</body>
</html>